package nc.appcan.bill.vo;

import java.util.HashMap;
import java.util.Map;

public class AllotOrderVO {
	private AllotOrderHeadVO head;
	private AllotOrderItemVO[] body;
	public AllotOrderHeadVO getHead() {
		return head;
	}
	public void setHead(AllotOrderHeadVO head) {
		this.head = head;
	}
	public AllotOrderItemVO[] getBody() {
		return body;
	}
	public void setBody(AllotOrderItemVO[] body) {
		this.body = body;
	}
	public String getCodes(){
		StringBuffer st = new StringBuffer();
		for(AllotOrderItemVO itemvo:this.body){
			st.append("'").append(itemvo.getMemo()).append("'").append(",");
		}
		return st.substring(0, st.length()-1);
	}
	public Map<String ,AllotOrderItemVO> getBodyMap(){
		Map<String ,AllotOrderItemVO>  map = new HashMap<String,AllotOrderItemVO>();
		for(AllotOrderItemVO itemvo:this.body){
			map.put(itemvo.getMemo(), itemvo);
		}
		return map;
	}
	

}
